@echo off
find "Host is up" %SELFPATH%a.tmp && set IP=%1
find "80/tcp   open" %SELFPATH%a.tmp && set PORT1=80
find "443/tcp  open" %SELFPATH%a.tmp && set PORT2=443
find "8080/tcp open" %SELFPATH%a.tmp && set PORT3=8080
if %IP% == %1 echo %IP%;%PORT1%;%PORT2%;%PORT3% >> %SELFPATH%result.txt